verify

abstract suspend fun verify(unverifiedSdJwt: String): Result<SdJwt<JWT>>(source)

Verifies an SD-JWT serialized using compact serialization.

Typically, this is useful to Holder that wants to verify an issued SD-JWT, or to Verifier that wants to verify a presented SD-JWT in case the KB-JWT must not be present.

Return

the verified SD-JWT, if valid. Otherwise, method could raise a SdJwtVerificationException The verified SD-JWT will contain a JWT as both string and decoded payload

Parameters

unverifiedSdJwt

the SD-JWT to be verified


abstract suspend fun verify(unverifiedSdJwt: JsonObject): Result<SdJwt<JWT>>(source)

Verifies an SD-JWT serialized using JWS JSON serialization (either general or flattened format) as defined by RFC7515 and extended by SD-JWT specification.

Typically, this is useful to Holder that wants to verify an issued SD-JWT, or to Verifier that wants to verify a presented SD-JWT in case the KB-JWT must not be present.

Return

the verified SD-JWT, if valid. Otherwise, method could raise a SdJwtVerificationException The verified SD-JWT will contain a JWT as both string and decoded payload

Parameters

unverifiedSdJwt

the SD-JWT to be verified. A JSON Object that is expected to be in general or flatten form as defined in RFC7515 and extended by SD-JWT specification.


abstract suspend fun verify(unverifiedSdJwt: String, challenge: JsonObject?): Result<SdJwtAndKbJwt<JWT>>(source)

Verifies a SD-JWT+KB serialized using compact serialization. Typically, this is useful to Verifier that want to verify presentation SD-JWT communicated by Holders.

Return

the verified SD-JWT and the KeyBinding JWT, if valid. Otherwise, method could raise a SdJwtVerificationException The verified SD-JWT will the JWT and KeyBinding JWT are representing in both string and decoded payload. Expected errors are reported via a SdJwtVerificationException

Parameters

unverifiedSdJwt

the SD-JWT to be verified

challenge

verifier's challenge, expected to be found in KB-JWT (signed by wallet)


abstract suspend fun verify(unverifiedSdJwt: JsonObject, challenge: JsonObject?): Result<SdJwtAndKbJwt<JWT>>(source)

Verifies a SD-JWT+KB in JWS JSON serialization. Typically, this is useful to Verifier that want to verify presentation SD-JWT communicated by Holders

Return

the verified SD-JWT and KeyBinding JWT, if valid. Otherwise, method could raise a SdJwtVerificationException The verified SD-JWT will the JWT and KeyBinding JWT are representing in both string and decoded payload. Expected errors are reported via a SdJwtVerificationException

Parameters

unverifiedSdJwt

the SD-JWT to be verified in JWS JSON

challenge

verifier's challenge, expected to be found in KB-JWT (signed by wallet)